class_name 灵阵Operation extends Node

var operationManager:OperationManager
var big:Big

func init(om:OperationManager):
	self.operationManager = om
	return self

func preparation_灵阵_迷雾森林():
	operationManager.arr_listeningPoints.clear()
	var point = operationManager.selectedPoint
	var arrAroundPoints = GameUtils.getArrPointsHasView()
	arrAroundPoints.append(point)
	for p in arrAroundPoints:
		operationManager.arr_listeningPoints.append(p)
	GameUtils.neatAnimation()
	big = point.big
	big.detailHide()

func preparation_灵阵_佛法慈悲():
	operationManager.arr_listeningPoints.clear()
	var point = operationManager.selectedPoint
	var arrAroundPoints = GameUtils.getArrPointsHasView()
	for p in arrAroundPoints:
		operationManager.arr_listeningPoints.append(p)
	GameUtils.neatAnimation()
	big = point.big
	big.detailHide()

func preparation_灵阵_九曲黄河():
	operationManager.arr_listeningPoints.clear()
	var point = operationManager.selectedPoint
	var arrAroundPoints = GameUtils.getArrPointsHasView()
	for p in arrAroundPoints:
		operationManager.arr_listeningPoints.append(p)
	GameUtils.neatAnimation()
	big = point.big
	big.detailHide()

func preparation_灵阵_地狱杀伐():
	operationManager.arr_listeningPoints.clear()
	var point = operationManager.selectedPoint
	var arrAroundPoints = GameUtils.getArrPointsHasView()
	for p in arrAroundPoints:
		operationManager.arr_listeningPoints.append(p)
	GameUtils.neatAnimation()
	big = point.big
	big.detailHide()

func 灵阵_迷雾森林(point:Point):
	WebSocketManager.sendObj(true,"灵阵_迷雾森林",{"start":big.point.id,"end":point.id})
	operationManager.cancel()

func 灵阵_佛法慈悲(point:Point):
	WebSocketManager.sendObj(true,"灵阵_佛法慈悲",{"start":big.point.id,"end":point.id})
	operationManager.cancel()

func 灵阵_九曲黄河(point:Point):
	WebSocketManager.sendObj(true,"灵阵_九曲黄河",{"start":big.point.id,"end":point.id})
	operationManager.cancel()

func 灵阵_地狱杀伐(point:Point):
	WebSocketManager.sendObj(true,"灵阵_地狱杀伐",{"start":big.point.id,"end":point.id})
	operationManager.cancel()
